<?php

if (!function_exists('humpToLine')) {
    /*
     * 驼峰转下划线
     */
    function humpToLine($str) {
        $str = preg_replace_callback('/([A-Z]{1})/', function ($matches) {
            return '_' . strtolower($matches [0]);
        }, $str);
            return substr($str, 1);
    }
}
